extends Node

var diamond:int=99
var triangle:int=99
var cube:int=99

var BGM:AudioStreamPlayer

var flag_list={
			"hint2":0,"hint3":0,"hint4":0,
			"level1_enter":0,"level1_fin":0,"level1_pass":0,
			"level2_enter":0,"level2_fin":0,"level2_pass":0,
			"level3_enter":0,"level3_fin":0,"level3_pass":0,
			"level4_enter":0,"level4_fin":0,"level4_pass":0,
			"level5_enter":0,"level5_fin":0,"level5_pass":0,
			"level6_enter":0,"level6_fin":0,"level6_pass":0,
			"level7_enter":0,"level7_fin":0,"level7_pass":0,
			"level8_enter":0,"level8_fin":0,"level8_pass":0,
			"level9_enter":0,"level9_fin":0,"level9_pass":0,
			}

var dialog_list={
				"hint1":[
					{"person":"?","word":"在日记中，你可以看到三种颜色的情感结晶。","conti":"next"},
					{"person":"?","word":"收集它们，你就可以在这里搭建桥梁。","conti":"next"},
					{"person":"?","word":"按E键打开建造界面。","conti":"next"},
					{"person":"?","word":"左键选中区域后，右键撤回选区。","conti":"next"},
					{"person":"?","word":"选中区域后，按下1便可消耗材料建造一个稳定的，永久的桥梁。","conti":"next"},
					{"conti":"end"},
					],
				"hint2":[
					{"person":"?","word":"如果情感结晶有限，你也可以按下2或3来建造一个不稳定的桥梁。","conti":"next"},
					{"person":"?","word":"不过需要注意的是，不稳定的桥梁只能走一次。","conti":"next"},
					{"conti":"end"},
					],
				"hint3":[
					{"person":"?","word":"除此之外，日记中还散落了不少的记忆碎片，就是那些金色的光点。","conti":"next"},
					{"person":"?","word":"不过小心，当它们变成灰色时，会尝试来攻击你，","conti":"next"},
					{"person":"?","word":"你得等到它们变成金色时再去拾取。","conti":"next"},
					{"person":"?","word":"记忆碎片可以用来修复心象灯塔。","conti":"next"},
					{"person":"?","word":"这个数量......","conti":"next"},
					{"person":"?","word":"应该足够我们修复现在这个区域的心象灯塔......","conti":"next"},
					{"person":"?","word":"当然，如果你陷入了困境的话......","conti":"next"},
					{"person":"?","word":"R键会帮助你的。","conti":"next"},
					{"conti":"end"},
					],
				"hint4":[
					{"person":"?","word":"小心那些红色的地面！","conti":"next"},
					{"person":"?","word":"它们对你并不友好。","conti":"next"},
					{"person":"?","word":"但是，记忆碎片似乎不受影响。","conti":"next"},
					{"conti":"end"},
					],
				"*-1":[
					{"person":"画师","word":"......","conti":"next"},
					{"conti":"end"},
					],
				"*-2":[
					{"person":"画师的妻子","word":"我很担心......","conti":"next"},
					{"conti":"end"},
					],
				"*-3":[
					{"person":"画师的女儿","word":"嗯......","conti":"next"},
					{"conti":"end"},
					],
				"A":[
					{"conti":"trigger","flag":"level1_fin"},
					{"conti":"end"},
					],
				"B1":[
					{"person":"画师","word":"还只有一个图层......","conti":"next"},
					{"conti":"trigger","flag":"level2_fin"},
					{"conti":"end"},
					],
				"B2":[
					{"person":"画师","word":"我预想过很多种糟糕的日子......","conti":"next"},
					{"conti":"trigger","flag":"level2_fin"},
					{"conti":"end"},
					],
				"B3":[
					{"person":"画师","word":"她的脸有这么圆吗？","conti":"next"},
					{"person":"画师","word":"......或许我该翻翻我小时候对她的描述......","conti":"next"},
					{"conti":"trigger","flag":"level2_fin"},
					{"conti":"end"},
					],
				"B4":[
					{"person":"画师","word":"我好想要她来帮忙......","conti":"next"},
					{"person":"画师","word":"不行，我不敢想象到时候会是什么尴尬的局面......","conti":"next"},
					{"conti":"trigger","flag":"level2_fin"},
					{"conti":"end"},
					],
				"C":[
					{"conti":"trigger","flag":"level3_fin"},
					{"conti":"end"},
					],
				"D":[
					{"conti":"trigger","flag":"level4_fin"},
					{"conti":"end"},
					],
				"E":[
					{"conti":"trigger","flag":"level5_fin"},
					{"conti":"end"},
					],
				"F1":[
					{"person":"画师","word":"在我女儿降生的那一天，旧的生活彻底改变了，","conti":"next"},
					{"person":"画师","word":"如今我对此依然感到难以置信，感到恍惚，","conti":"next"},
					{"person":"画师","word":"好像我仍然被困在过去的日子里......","conti":"next"},
					{"conti":"trigger","flag":"level6_fin"},
					{"conti":"end"},
					],
				"F2":[
					{"person":"画师","word":"这位小天使值得我最好的画作......","conti":"next"},
					{"conti":"trigger","flag":"level6_fin"},
					{"conti":"end"},
					],
				"F3":[
					{"person":"画师","word":"唉，照她今天的样子，我又要改画了......","conti":"next"},
					{"conti":"trigger","flag":"level6_fin"},
					{"conti":"end"},
					],
				"F4":[
					{"person":"画师","word":"现在我和她也许再也没有交流的机会了......","conti":"next"},
					{"person":"画师","word":"我连...都做不到......","conti":"next"},
					{"conti":"trigger","flag":"level6_fin"},
					{"conti":"end"},
					],
				"G":[
					{"conti":"trigger","flag":"level7_fin"},
					{"conti":"end"},
					],
				"H":[
					{"conti":"trigger","flag":"level8_fin"},
					{"conti":"end"},
					],
				"I":[
					{"conti":"trigger","flag":"level9_fin"},
					{"conti":"end"},
					],
				"0":[
					{"conti":"fade_in"},
					{"person":"?","word":"也许你对日复一日的安全早已习以为常，","conti":"next"},
					{"person":"?","word":"但危险与病痛，","conti":"next"},
					{"person":"?","word":"死亡的威胁，","conti":"next"},
					{"person":"?","word":"它们是突如其来，不讲道理的滔天巨浪，","conti":"next"},
					{"person":"?","word":"把一切的努力，一切的奋斗，一切人与人之间的真情，爱与包容的关系，","conti":"next"},
					{"person":"?","word":"消耗殆尽......","conti":"next"},
					{"person":"?","word":"......","conti":"next"},
					{"person":"?","word":"不过先不用太担心，","conti":"next"},
					{"person":"?","word":"至少到目前为止，","conti":"next"},
					{"person":"?","word":"你只是一个身体不好不坏，满怀爱心的志愿者......","conti":"next"},
					{"person":"?","word":"......","conti":"next"},
					{"conti":"fade_out"},
					{"person":"?","word":"（点击人物进行对话）","conti":"next"},
					{"conti":"end"},
					],
				"1-1":[
					{"person":"你","word":"（*询问*）","conti":"next"},
					{"person":"画师","word":"为什么......","conti":"next"},
					{"person":"画师","word":"为什么不是色盲，不是失明，却是这个......","conti":"next"},
					{"person":"画师","word":"你别过来！别过来！","conti":"next"},
					{"person":"画师","word":"不要把乱七八糟的病传染给我......","conti":"next"},
					{"person":"画师","word":"放我回我的画室！","conti":"next"},
					{"conti":"end"},
					],
				"1-2":[
					{"person":"你","word":"（*询问*）","conti":"next"},
					{"person":"画师的妻子","word":"他不肯任何人靠近他......","conti":"next"},
					{"person":"画师的妻子","word":"我确信他知道渐冻症不是什么可以传染的病，","conti":"next"},
					{"person":"画师的妻子","word":"但从大约一个月前起他精神变得有些不正常，","conti":"next"},
					{"person":"画师的妻子","word":"开始固执地认为肯定是有什么人或者什么东西导致他得了渐冻症，","conti":"next"},
					{"person":"画师的妻子","word":"利鲁唑也不肯吃......","conti":"next"},
					{"person":"画师的妻子","word":"我现在除了照顾他外，还得再打一份工，","conti":"next"},
					{"person":"画师的妻子","word":"可他家里其他人，没有一个愿意守着他......","conti":"next"},
					{"conti":"end"},
					],
				"1-3":[
					{"person":"你","word":"（*询问*）","conti":"next"},
					{"person":"画师的女儿","word":"（小声）悄悄地告诉你，","conti":"next"},
					{"person":"画师的女儿","word":"我早就跟我爸妈说过，搞艺术就是会给人带来不幸......","conti":"next"},
					{"person":"画师的女儿","word":"你问我为什么？","conti":"next"},
					{"person":"画师的女儿","word":"......偷偷告诉你，在我看的动画，电视剧还有电影里头，","conti":"next"},
					{"person":"画师的女儿","word":"只要是搞艺术的，总是最先倒霉的......","conti":"next"},
					{"conti":"end"},
					],
				"1-4":[
					{"person":"你","word":"（*询问*）","conti":"next"},
					{"person":"医生","word":"其实他的渐冻症还没严重到你想象的那个地步。","conti":"next"},
					{"person":"医生","word":"但......好吧，照他目前这个样子,确实比起中期更像是中晚期的症状表现。","conti":"next"},
					{"person":"医生","word":"我知道他到底在寻思什么，他只是还不肯接受现实......","conti":"next"},
					{"person":"医生","word":"不管怎样，我们医护人员会全力维系他的生命。","conti":"next"},
					{"person":"医生","word":"但他目前的状态确实让我们有些难办......","conti":"next"},
					{"person":"?","word":"也许你该看看他的日记，不用担心，这方面你已经得到授权了......","conti":"next"},
					{"person":"?","word":"（按Q键进入心象世界）","conti":"next"},
					{"conti":"end"},
					],
				"2-1":[
					{"person":"你","word":"（*询问*）","conti":"next"},
					{"person":"画师","word":"为什么......","conti":"next"},
					{"person":"画师","word":"为什么不是色盲，不是失明，却是这个......","conti":"next"},
					{"person":"画师","word":"你别过来！别过来！","conti":"next"},
					{"person":"画师","word":"不要把乱七八糟的病传染给我......","conti":"next"},
					{"person":"画师","word":"放我回我的画室！","conti":"next"},
					{"conti":"choice",
						"num":4,
						"word":[
								"需要我帮忙把您的数位板和电脑拿来吗？",
								"需要我帮忙把您的画笔和未完成的作品拿来吗？",
								"需要我帮忙把您的画作都拿过来吗？",
								"需要我帮忙跟单主们说明情况让他们退单吗？",
								],
						"fn":[
							{"line":"2-1T","index":0},
							{"line":"2-1W","index":0},
							{"line":"2-1W","index":0},
							{"line":"2-1W","index":0},
							]},
					{"conti":"end"},
					],
				"2-1W":[
					{"person":"画师","word":"你走开！......我不需要！","conti":"next"},
					{"conti":"end"},
					],
				"2-1T":[
					{"person":"画师","word":"对！......把数位板和电脑给我！我还能......！","conti":"next"},
					{"person":"画师","word":"哦不，不对，","conti":"next"},
					{"person":"画师","word":"我早把我的电脑砸坏了，","conti":"next"},
					{"person":"画师","word":"数位板也是......","conti":"next"},
					{"person":"画师","word":"我已经无法完成我的最后一张画了......","conti":"next"},
					{"person":"?","word":"(内心世界似乎发生了变化)","conti":"next"},
					{"conti":"trigger","flag":"level2_enter"},
					{"conti":"change","level":1},
					{"conti":"end"},
					],
				"3-2":[
					{"person":"画师的妻子","word":"他甚至连我都不肯靠近，他到底在想什么呢......","conti":"next"},
					{"person":"你","word":"他怕毁了","conti":"next"},
					{"conti":"choice",
						"num":4,
						"word":[
								"你的生活",
								"他的最后一张画",
								"你关于他的记忆",
								"你的健康",
								],
						"fn":[
							{"line":"3-2T","index":0},
							{"line":"3-2W","index":0},
							{"line":"3-2W","index":0},
							{"line":"3-2W","index":0},
							]},
					{"conti":"end"},
					],
				"3-2W":[
					{"person":"画师的妻子","word":"也许吧.......","conti":"next"},
					{"conti":"end"},
					],
				"3-2T":[
					{"person":"画师的妻子","word":"(她楞了一下，眼中闪过一丝光芒)","conti":"next"},
					{"person":"?","word":"(内心世界似乎发生了变化)","conti":"next"},
					{"conti":"trigger","flag":"level3_enter"},
					{"conti":"change","level":2},
					{"conti":"end"},
					],
				"4-2":[
					{"person":"画师的妻子","word":"可要是连我都远离他了，又有谁能照顾他呢？","conti":"next"},
					{"person":"你","word":"实际上他很想寻求你的帮助画完他的最后一张画，","conti":"next"},
					{"person":"你","word":"只是他觉得","conti":"next"},
					{"conti":"choice",
						"num":4,
						"word":[
								"这太为难你了",
								"你应该没有精力做这件事",
								"你可能没法做好这件事",
								"有点难为情",
								],
						"fn":[
							{"line":"4-2W","index":0},
							{"line":"4-2W","index":0},
							{"line":"4-2W","index":0},
							{"line":"4-2T","index":0},
							]},
					{"conti":"end"},
					],
				"4-2W":[
					{"person":"画师的妻子","word":"是么.......","conti":"next"},
					{"conti":"end"},
					],
				"4-2T":[
					{"person":"画师的妻子","word":"啊......?","conti":"next"},
					{"person":"?","word":"(内心世界似乎发生了变化)","conti":"next"},
					{"conti":"trigger","flag":"level4_enter"},
					{"conti":"change","level":3},
					{"conti":"end"},
					],
				"5-2":[
					{"person":"画师的妻子","word":"可是，即使我想帮忙，我连他在画什么都不知道......","conti":"next"},
					{"person":"你","word":"他最后的那张画，其实是在画","conti":"next"},
					{"conti":"choice",
						"num":4,
						"word":[
								"你",
								"他以前暗恋的对象",
								"他在遇到你之前的“精神朋友”",
								"他在遇到你之前的“精神偶像”",
								],
						"fn":[
							{"line":"5-2W","index":0},
							{"line":"5-2W","index":0},
							{"line":"5-2T","index":0},
							{"line":"5-2W","index":0},
							]},
					{"conti":"end"},
					],
				"5-2W":[
					{"person":"画师的妻子","word":".......","conti":"next"},
					{"conti":"end"},
					],
				"5-2T":[
					{"person":"画师的妻子","word":"......！","conti":"next"},
					{"person":"?","word":"(内心世界似乎发生了变化)","conti":"next"},
					{"conti":"trigger","flag":"level5_enter"},
					{"conti":"change","level":4},
					{"conti":"end"},
					],
				"6":[
					{"person":"?","word":"......","conti":"next"},
					{"conti":"fade_in"},
					{"person":"画师","word":"不，我得和你解释，这实在是太......","conti":"next"},
					{"person":"画师的妻子","word":"还记得当初结婚誓词我怎么跟你说的吗？","conti":"next"},
					{"person":"画师","word":"我记得。","conti":"next"},
					{"person":"画师的妻子","word":"“我会接纳属于你的一切”，","conti":"next"},
					{"person":"画师的妻子","word":"也包括你精神里的“那个朋友”。","conti":"next"},
					{"conti":"image","image":"res://art/image/back_ground/friend_01.png"},
					{"person":"画师的妻子","word":"我知道，她陪伴了你的整个童年和青春，","conti":"next"},
					{"person":"画师的妻子","word":"在我到来之前，是她一直在帮你抵御孤独。","conti":"next"},
					{"conti":"image","image":"res://art/image/back_ground/friend_02.png"},
					{"person":"画师的妻子","word":"我想，对我们两个人来说，这幅画都会是对她最好的谢礼......","conti":"next"},
					{"person":"画师的妻子","word":"我们都应该向她好好告别。","conti":"next"},
					{"conti":"image","image":"res://art/image/back_ground/friend_03.png"},
					{"person":"画师","word":"......","conti":"next"},
					{"person":"画师","word":"......志愿者同志，","conti":"next"},
					{"person":"画师","word":"能帮我再捎一份数位板和电脑吗。","conti":"next"},
					{"conti":"image","image":"clear"},
					{"conti":"trigger","flag":"level6_enter"},
					{"conti":"change","level":5},
					{"conti":"fade_out"},
					{"person":"?","word":"(内心世界似乎发生了变化)","conti":"next"},
					{"conti":"end"},
					],
				"7-3":[
					{"person":"画师的女儿","word":"（小声）你说，我爸爸到底是一个怎样的人呢？","conti":"next"},
					{"person":"你","word":"他是一个很（）的人","conti":"next"},
					{"conti":"choice",
						"num":4,
						"word":[
								"理想",
								"事业",
								"艺术",
								"念旧",
								],
						"fn":[
							{"line":"7-3W","index":0},
							{"line":"7-3W","index":0},
							{"line":"7-3W","index":0},
							{"line":"7-3T","index":0},
							]},
					{"conti":"end"},
					{"conti":"end"},
					],
				"7-3W":[
					{"person":"画师的女儿","word":"我就知道你也会这样想，看来我的直觉很准！","conti":"next"},
					{"conti":"end"},
					],
				"7-3T":[
					{"person":"画师的女儿","word":"......念旧？你这么一说，好像.......","conti":"next"},
					{"person":"画师的女儿","word":"对，以前在家里吃晚饭的时候，他总是一提起过去的事情就口若悬河，","conti":"next"},
					{"person":"画师的女儿","word":"要是没有妈妈提醒，我睡在他们俩人中间，肯定睡不着觉！","conti":"next"},
					{"person":"画师的女儿","word":"......可他真的很少聊我的事，","conti":"next"},
					{"person":"画师的女儿","word":"放学回家路上我跟他讲学校里发生的事，他总是支支吾吾的，","conti":"next"},
					{"person":"画师的女儿","word":"每次一回家，他就像个胆小鬼一样冲进卧室里......","conti":"next"},
					{"person":"画师的女儿","word":"（小声）你说，他是不是不认我这个女儿？","conti":"next"},
					{"person":"?","word":"(内心世界似乎发生了变化)","conti":"next"},
					{"conti":"trigger","flag":"level7_enter"},
					{"conti":"change","level":6},
					{"conti":"end"},
					],
				"8-3":[
					{"person":"画师的女儿","word":"（小声）你说，他是不是不认我这个女儿？","conti":"next"},
					{"person":"你","word":"他只是一直害怕会","conti":"next"},
					{"conti":"choice",
						"num":4,
						"word":[
								"惹你不开心",
								"让你发现他的秘密",
								"让你遗传他的孤僻和念旧特质",
								"让你太依赖他",
								],
						"fn":[
							{"line":"8-3W","index":0},
							{"line":"8-3T","index":0},
							{"line":"8-3W","index":0},
							{"line":"8-3W","index":0},
							]},
					{"conti":"end"},
					{"conti":"end"},
					],
				"8-3W":[
					{"person":"画师的女儿","word":"你好老套哦......","conti":"next"},
					{"conti":"end"},
					],
				"8-3T":[
					{"person":"画师的女儿","word":"秘密？","conti":"next"},
					{"person":"?","word":"(内心世界似乎发生了变化)","conti":"next"},
					{"conti":"trigger","flag":"level8_enter"},
					{"conti":"change","level":7},
					{"conti":"end"},
					],
				"9-3":[
					{"person":"画师的女儿","word":"秘密？那你快说说，有什么秘密？","conti":"next"},
					{"person":"你","word":"其实，他暗地里一直在（），但总是不如意，总是要修改，因此只能一直瞒着躲着。","conti":"next"},
					{"conti":"choice",
						"num":4,
						"word":[
								"尽他最大努力画一张最好的画献给你",
								"以你为主角画一幅这个世界上最好的画作献给你",
								"纠结对你的培养方案",
								"为你画一份只属于你的画集",
								],
						"fn":[
							{"line":"9-3W","index":0},
							{"line":"9-3T","index":0},
							{"line":"9-3W","index":0},
							{"line":"9-3W","index":0},
							]},
					{"conti":"end"},
					{"conti":"end"},
					],
				"9-3W":[
					{"person":"画师的女儿","word":"......","conti":"next"},
					{"conti":"end"},
					],
				"9-3T":[
					{"person":"画师的女儿","word":"真的吗？","conti":"next"},
					{"person":"画师的女儿","word":".......那你跟他说，我不要什么最好的画作，我只要他给我画一张生日贺卡。","conti":"next"},
					{"person":"?","word":"(内心世界似乎发生了变化)","conti":"next"},
					{"conti":"trigger","flag":"level9_enter"},
					{"conti":"change","level":8},
					{"conti":"end"},
					],
				"10":[
					{"person":"?","word":"......","conti":"next"},
					{"conti":"fade_in"},
					{"conti":"image","image":"res://art/image/back_ground/birthdaycard_01.png"},
					{"person":"画师","word":"只要一张贺卡......?","conti":"next"},
					{"person":"画师的女儿","word":"只要一张贺卡！你教我，我来画！四舍五入就算你给我画的了！","conti":"next"},
					{"person":"画师","word":"可是......","conti":"next"},
					{"person":"画师的女儿","word":"爸爸，能教得仔细一点，跟我多说几句话吗？","conti":"next"},
					{"person":"画师","word":"......好......","conti":"next"},
					{"conti":"image","image":"res://art/image/back_ground/birthdaycard_02.png"},
					{"person":"画师的女儿","word":"爸爸，你的画，以后就都属于我了......","conti":"next"},
					{"person":"画师","word":"......好......好啊......本来我也没有什么好赔的了......","conti":"next"},
					{"person":"画师的女儿","word":"既然如此，在这之后，你的画由我来完成......","conti":"next"},
					{"person":"画师","word":"......嗯？","conti":"next"},
					{"person":"画师的女儿","word":"我说，在这之后，你的画由我来完成。我一定会成为最好的我......","conti":"next"},
					{"person":"画师","word":"啊......好......好啊......","conti":"next"},
					{"person":"？","word":"......","conti":"next"},
					{"conti":"image","image":"clear"},
					{"conti":"fade_out"},
					{"conti":"jump_to","line":"finale","index":0},
					{"conti":"end"},
					],
				"finale":[
					{"conti":"fade_in"},
					{"conti":"audio","audio":"res://art/audio/peace.wav"},
					{"conti":"image","image":"res://art/image/back_ground/will.png"},
					{"person":"?","word":"在此之后，","conti":"next"},
					{"person":"?","word":"这份遗书与画家笑容灿烂的遗像被裱在了一起，被画家的亲人挂在家里最显眼的位置，","conti":"next"},
					{"person":"?","word":"遗书的内容也镌刻在了画家的墓碑上。","conti":"next"},
					{"person":"?","word":"至少，在无可避免的死亡之前，画家有个幸福的离别。","conti":"next"},
					{"person":"?","word":"这也许就是不可辜负的生命，最后的快乐与尊严。","conti":"next"},
					{"person":"?","word":"连通过去与未来之桥已然建起，","conti":"next"},
					{"person":"?","word":"灵魂之桥将获得永生。","conti":"next"},
					{"person":"?","word":"谢谢你，远方的朋友，","conti":"next"},
					{"person":"?","word":"祝你和你所珍视的人们度过健康美满的一生。","conti":"next"},
					{"conti":"image","image":"clear"},
					{"conti":"finale"},
					],
				}
				
var cur_line="0"
var cur_index=0
var cur_checkpoint=0

func _ready() -> void:
	BGM=AudioStreamPlayer.new()
	add_child(BGM)
